#pragma once
#include <string>
#include <d3d9.h>
#include <d3dx9.h>
#include <DXFile.h>


class XParser
{
public:
	XParser(void);
	virtual ~XParser(void);

	bool Parse(LPCSTR  fileName, void **data = NULL);

protected:
	
	virtual bool ParseObject(ID3DXFileData *object, ID3DXFileData *parentObject,
									DWORD depth, void **data,  bool ref)
	{
		return ParseChildObject(object, depth, data, ref);
	}
	virtual bool ParseChildObject(ID3DXFileData * obj, DWORD depth, void **data, bool ref);

};
